<template>
  <div class="my-order">
    <nav-bar :title="title"
             bgColor="#eeeeee"></nav-bar>
    <div class="order-content">
      <div class="order-item"
           @click="$router.push({path: '/orderDetail'})">
        <div class="order-item-title">
          <li>
            <van-icon name="shop-o" />
            <span>美的旗舰店</span>
          </li>
          <span>待付款</span>
        </div>
        <order-good-card :rightShow="true"
                         v-for="item in 3"
                         :key="item">
        </order-good-card>
        <div class="order-item-price">
          共两件商品，需付款：<span>¥116.00</span>
        </div>
        <div class="order-item-footer">
          <span>修改地址</span>
          <span class="order-btn-success">去支付</span>
        </div>
      </div>
      <div class="order-item">
        <div class="order-item-title">
          <li>
            <van-icon name="shop-o" />
            <span>美的旗舰店</span>
          </li>
          <span>待付款</span>
        </div>
        <order-good-card :rightShow="true">
        </order-good-card>
        <div class="order-item-price">
          共两件商品，需付款：<span>¥116.00</span>
        </div>
        <div class="order-item-footer">
          <span>修改地址</span>
          <span class="order-btn-success">去支付</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import NavBar from '@/components/NavBarSecond'
import OrderGoodCard from '@/components/OrderGoodCard'
export default {
  data () {
    return {
      title: '我的订单'
    };
  },
  components: {
    NavBar, OrderGoodCard
  },
  created () {
    let type = this.$route.params.type
    if (type) {
      this.title = type
    }
  },
  methods: {}
}

</script>


<style lang='scss'>
.my-order {
  @include top-page;
  background-color: #eeeeee;
  .order-content {
    flex: 1;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 0.1rem;
    .order-item {
      width: 100%;
      background-color: #ffffff;
      border-radius: 0.15rem;
      box-sizing: border-box;
      padding: 0.15rem;
      margin-bottom: 0.2rem;
      .order-item-title {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.2rem;
        font-size: 0.28rem;
        color: #131415;
        > li {
          display: flex;
          align-items: center;
          .van-icon {
            font-size: 0.3rem;
            margin-right: 0.1rem;
          }
        }
        > span {
          color: #e85014;
          font-size: 0.26rem;
        }
      }
      .order-good-card {
        margin: 0.1rem 0;
        box-sizing: border-box;
        padding: 0 0.1rem;
      }
      .order-item-price {
        font-size: 0.26rem;
        font-weight: 600;
        color: #131415;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        height: 0.66rem;
        span {
          font-size: 0.32rem;
          color: #e85014;
        }
      }
      .order-item-footer {
        display: flex;
        justify-content: flex-end;
        span {
          width: 1.6rem;
          height: 0.5rem;
          line-height: 0.5rem;
          text-align: center;
          border: 1px solid #666666;
          border-radius: 1rem;
          color: #666666;
          margin-left: 0.3rem;
          font-size: 0.24rem;
        }
        .order-btn-success {
          color: #e85014;
          border: 1px solid #e85014;
        }
      }
    }
  }
}
</style>